import random

print("第一次写游戏")
print("*猜数字游戏*")
n3 = 0
n4 = 0

one = input("是否开始游戏[Y/N]?")
if (one == "y") or (one == "Y"):
    while (0 == 0):
        n1 = random.randint(1, 100)
        n3 += 1
        print("现在的局数%s，总共分数为%s" % (n3, n4))
        while (0 == 0):
            n2 = int(input("你输入的数："))
            if (n1 == n2):
                n4 += 1
                print("恭喜你猜中了！你的积分为%s" % n4)
                break
            if (n1 != n2):
                if (n1 >= n2):
                    print("你输入的数太小了！")
                else:
                    print("你输入的数太大了！")
        onemore = input("还要再玩一次嘛[Y/N]?")
        if onemore != "y" or onemore != "Y":
            print("欢迎下次再玩！")
            print("你的成绩如下：")
            print("局数{}".format(n3))
            print("积分{}".format(n4))
            break
else:
    print("欢迎下次游玩！")